<template>
  <div class="page-image">
    <!-- 补空 -->
    <div class="add-block">
      <img v-show="mivaShow" class="card-jiao card-jiao-l" src="@/assets/A_block.png">
      <span class="add-block-title">长图简漫</span>
      <img v-show="mivaShow" class="card-jiao card-jiao-r" src="@/assets/A_block.png">
    </div>
    <!-- 列表实体 -->
    <itemImage v-for="(temp, index) in list" :key="index" :index="index" :item-data="temp" />
    <!-- 数据加载器 -->
    <handlerListData type="longImage" @get-data="getData" />
  </div>
</template>

<script>
import itemImage from '@/components/ItemImage'
import handlerListData from '@/components/HandlerListData'
export default {
  components: {
    itemImage,
    handlerListData
  },
  data() {
    return {
      list: []
    }
  },
  computed: {
    mivaShow() {
      return this.$store.state.mivaShow
    }
  },
  methods: {
    getData(list) {
      this.list = list
    }
  }
}
</script>

<style lang="scss" scoped>
.add-block {
  width: calc(40% - 10px);
  height: 0;
  padding-bottom: 20%;
  position: absolute;
  top: 70px;
  right: 7%;
  white-space: nowrap;
  box-sizing: initial;
  border: 1px solid #fafafa;
  box-shadow: 0 0 5px #f45050;
  border-radius: 10px;
  background: #fafafa;
  .add-block-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #AE252B;
  }
  .card-jiao {
    width: 10%;
    position: absolute;
    &.card-jiao-l {
      top: -5px;
      left: 15px;
      transform: rotateZ(-90deg);
    }
    &.card-jiao-r {
      bottom: -5px;
      right: 15px;
      transform: rotateZ(90deg);
    }
  }
}
</style>
